<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Doxygen: io/include/pcl/io/dinast_grabber.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Doxygen
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('dinast__grabber_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">dinast_grabber.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Software License Agreement (BSD License)</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> *  Point Cloud Library (PCL) - www.pointclouds.org</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *  Copyright (c) 2012-, Open Perception, Inc.</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> *  All rights reserved.</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> *  Redistribution and use in source and binary forms, with or without</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> *  modification, are permitted provided that the following conditions</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> *  are met:</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> *   * Redistributions of source code must retain the above copyright</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> *     notice, this list of conditions and the following disclaimer.</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> *   * Redistributions in binary form must reproduce the above</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> *     copyright notice, this list of conditions and the following</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> *     disclaimer in the documentation and/or other materials provided</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> *     with the distribution.</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> *   * Neither the name of the copyright holder(s) nor the names of its</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> *     contributors may be used to endorse or promote products derived</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> *     from this software without specific prior written permission.</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"> *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment"> *  &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="comment"> *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment"> *  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="comment"> *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="comment"> *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="comment"> *  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;</span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="comment"> *  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="comment"> *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="comment"> *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="comment"> *  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="comment"> *  POSSIBILITY OF SUCH DAMAGE.</span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="comment"> * $Id$</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160; </div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">#ifndef PCL_IO_DINAST_GRABBER_</span></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="preprocessor">#define PCL_IO_DINAST_GRABBER_</span></div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160; </div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="common_2include_2pcl_2point__types_8h.html">pcl/point_types.h</a>&gt;</span></div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="preprocessor">#include &lt;pcl/point_cloud.h&gt;</span></div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="preprocessor">#include &lt;pcl/io/grabber.h&gt;</span></div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="common_2time_8h.html">pcl/common/time.h</a>&gt;</span></div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="preprocessor">#include &lt;pcl/console/print.h&gt;</span></div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="preprocessor">#include &lt;libusb-1.0/libusb.h&gt;</span></div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="preprocessor">#include &lt;boost/circular_buffer.hpp&gt;</span></div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160; </div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="keyword">namespace </span>pcl</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;{</div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="classpcl_1_1_dinast_grabber.html">   57</a></span>&#160;  <span class="keyword">class </span>PCL_EXPORTS <a class="code" href="classpcl_1_1_dinast_grabber.html">DinastGrabber</a>: <span class="keyword">public</span> <a class="code" href="classpcl_1_1_grabber.html">Grabber</a></div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;  {</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    <span class="comment">// Define callback signature typedefs</span></div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    <span class="keyword">typedef</span> void (sig_cb_dinast_point_cloud) (<span class="keyword">const</span> boost::shared_ptr&lt;const pcl::PointCloud&lt;pcl::PointXYZI&gt; &gt;&amp;);</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    </div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    <span class="keyword">public</span>:</div>
<div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="classpcl_1_1_dinast_grabber.html#a0f1ea76f5beefbc32ce4f2dc050e7e43">   66</a></span>&#160;      <a class="code" href="classpcl_1_1_dinast_grabber.html#a0f1ea76f5beefbc32ce4f2dc050e7e43">DinastGrabber</a> (<span class="keyword">const</span> <span class="keywordtype">int</span> device_position=1);</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160; </div>
<div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="classpcl_1_1_dinast_grabber.html#ad544683be834a3e3d0f61e389afc2543">   69</a></span>&#160;      <span class="keyword">virtual</span> <a class="code" href="classpcl_1_1_dinast_grabber.html#ad544683be834a3e3d0f61e389afc2543">~DinastGrabber</a> () throw ();</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160; </div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;      virtual <span class="keywordtype">bool</span> </div>
<div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="classpcl_1_1_dinast_grabber.html#a24d3d6fd8a3f3d92fce222578b4d1da9">   75</a></span>&#160;      isRunning () const;</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;      </div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;      virtual std::<span class="keywordtype">string</span></div>
<div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="classpcl_1_1_dinast_grabber.html#a2bea6bf1386f91023717e6b781483148">   81</a></span>&#160;      getName ()<span class="keyword"> const</span></div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;<span class="keyword">      </span>{ <span class="keywordflow">return</span> (std::string (<span class="stringliteral">&quot;DinastGrabber&quot;</span>)); }</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;      </div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;      <span class="keyword">virtual</span> <span class="keywordtype">void</span></div>
<div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="classpcl_1_1_dinast_grabber.html#a2fa41a088e1ac5154f335ba340f2956e">   87</a></span>&#160;      <a class="code" href="classpcl_1_1_dinast_grabber.html#a2fa41a088e1ac5154f335ba340f2956e">start</a> ();</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160; </div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;      <span class="keyword">virtual</span> <span class="keywordtype">void</span></div>
<div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="classpcl_1_1_dinast_grabber.html#a9bce83d72bf4fc2015a1f75272d0dba7">   92</a></span>&#160;      <a class="code" href="classpcl_1_1_dinast_grabber.html#a9bce83d72bf4fc2015a1f75272d0dba7">stop</a> ();</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;      </div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;      <span class="keyword">virtual</span> <span class="keywordtype">float</span> </div>
<div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="classpcl_1_1_dinast_grabber.html#a9bb84bf353580f95dcefd6bf2539aa11">   96</a></span>&#160;      <a class="code" href="classpcl_1_1_dinast_grabber.html#a9bb84bf353580f95dcefd6bf2539aa11">getFramesPerSecond</a> () <span class="keyword">const</span>;</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160; </div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;      std::string</div>
<div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="classpcl_1_1_dinast_grabber.html#ab6bfc870a0ec85be4bdbf3ff1e5aae33">  101</a></span>&#160;      <a class="code" href="classpcl_1_1_dinast_grabber.html#ab6bfc870a0ec85be4bdbf3ff1e5aae33">getDeviceVersion</a> ();</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;      </div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    <span class="keyword">protected</span>:  </div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;      </div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;      <span class="keywordtype">void</span></div>
<div class="line"><a name="l00107"></a><span class="lineno"><a class="line" href="classpcl_1_1_dinast_grabber.html#aec6018ba8d3508ef9d2fdada8ee745be">  107</a></span>&#160;      <a class="code" href="classpcl_1_1_dinast_grabber.html#aec6018ba8d3508ef9d2fdada8ee745be">onInit</a> (<span class="keyword">const</span> <span class="keywordtype">int</span> device_id);</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;      </div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;      <span class="keywordtype">void</span></div>
<div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="classpcl_1_1_dinast_grabber.html#aa667c611eab72937cecc40c826060587">  115</a></span>&#160;      <a class="code" href="classpcl_1_1_dinast_grabber.html#aa667c611eab72937cecc40c826060587">setupDevice</a> (<span class="keywordtype">int</span> device_position,</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;                  <span class="keyword">const</span> <span class="keywordtype">int</span> id_vendor = 0x18d1, </div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;                  <span class="keyword">const</span> <span class="keywordtype">int</span> id_product = 0x1402);</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;      </div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;      <span class="keywordtype">bool</span></div>
<div class="line"><a name="l00125"></a><span class="lineno"><a class="line" href="classpcl_1_1_dinast_grabber.html#a3cb4273312fd2a265269fce6515b08bd">  125</a></span>&#160;      <a class="code" href="classpcl_1_1_dinast_grabber.html#a3cb4273312fd2a265269fce6515b08bd">USBRxControlData</a> (<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> req_code,</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;                        <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *buffer,</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;                        <span class="keywordtype">int</span> length);</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160; </div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;      <span class="keywordtype">bool</span></div>
<div class="line"><a name="l00135"></a><span class="lineno"><a class="line" href="classpcl_1_1_dinast_grabber.html#acc5af0ad29551a4c541a79c82d609080">  135</a></span>&#160;      <a class="code" href="classpcl_1_1_dinast_grabber.html#acc5af0ad29551a4c541a79c82d609080">USBTxControlData</a> (<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> req_code,</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;                        <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *buffer,</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;                        <span class="keywordtype">int</span> length);</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;      </div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;      <span class="keywordtype">int</span></div>
<div class="line"><a name="l00145"></a><span class="lineno"><a class="line" href="classpcl_1_1_dinast_grabber.html#a50dae74f09a229057e02d6af552fbe02">  145</a></span>&#160;      <a class="code" href="classpcl_1_1_dinast_grabber.html#a50dae74f09a229057e02d6af552fbe02">checkHeader</a> ();</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;      </div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;      <span class="keywordtype">void</span></div>
<div class="line"><a name="l00150"></a><span class="lineno"><a class="line" href="classpcl_1_1_dinast_grabber.html#a7e79adb26a2d56c4cc20f66c02463cc9">  150</a></span>&#160;      <a class="code" href="classpcl_1_1_dinast_grabber.html#a7e79adb26a2d56c4cc20f66c02463cc9">readImage</a> ();</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;      </div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;      pcl::PointCloud&lt;pcl::PointXYZI&gt;::Ptr</div>
<div class="line"><a name="l00156"></a><span class="lineno"><a class="line" href="classpcl_1_1_dinast_grabber.html#a28a7daa98254a86996bef98d19291650">  156</a></span>&#160;      <a class="code" href="classpcl_1_1_dinast_grabber.html#a28a7daa98254a86996bef98d19291650">getXYZIPointCloud</a> ();</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;      </div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;      <span class="keywordtype">void</span> </div>
<div class="line"><a name="l00161"></a><span class="lineno"><a class="line" href="classpcl_1_1_dinast_grabber.html#a2822119cebf9e6b70d83eba22e420df2">  161</a></span>&#160;      <a class="code" href="classpcl_1_1_dinast_grabber.html#a2822119cebf9e6b70d83eba22e420df2">captureThreadFunction</a> ();</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;      </div>
<div class="line"><a name="l00164"></a><span class="lineno"><a class="line" href="classpcl_1_1_dinast_grabber.html#a8edd638582619b2de7601c07dc16341f">  164</a></span>&#160;      <span class="keywordtype">int</span> <a class="code" href="classpcl_1_1_dinast_grabber.html#a8edd638582619b2de7601c07dc16341f">image_width_</a>;</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;      </div>
<div class="line"><a name="l00167"></a><span class="lineno"><a class="line" href="classpcl_1_1_dinast_grabber.html#a2248e2c024ed3854be881405b2f6d51f">  167</a></span>&#160;      <span class="keywordtype">int</span> <a class="code" href="classpcl_1_1_dinast_grabber.html#a2248e2c024ed3854be881405b2f6d51f">image_height_</a>;</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;      </div>
<div class="line"><a name="l00170"></a><span class="lineno"><a class="line" href="classpcl_1_1_dinast_grabber.html#a6306881b02a184daee20eae63b52ebc6">  170</a></span>&#160;      <span class="keywordtype">int</span> <a class="code" href="classpcl_1_1_dinast_grabber.html#a6306881b02a184daee20eae63b52ebc6">image_size_</a>;</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;      </div>
<div class="line"><a name="l00173"></a><span class="lineno"><a class="line" href="classpcl_1_1_dinast_grabber.html#ab7ddf2582ea6dfb424410a5a4f56bf14">  173</a></span>&#160;      <span class="keywordtype">int</span> <a class="code" href="classpcl_1_1_dinast_grabber.html#ab7ddf2582ea6dfb424410a5a4f56bf14">sync_packet_size_</a>;</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;      </div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;      <span class="keywordtype">double</span> dist_max_2d_;</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;      </div>
<div class="line"><a name="l00178"></a><span class="lineno"><a class="line" href="classpcl_1_1_dinast_grabber.html#a1f2efcf9ba4d7dd91504e0323c4aabbd">  178</a></span>&#160;      <span class="keywordtype">double</span> <a class="code" href="classpcl_1_1_dinast_grabber.html#a1f2efcf9ba4d7dd91504e0323c4aabbd">fov_</a>;</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;      </div>
<div class="line"><a name="l00181"></a><span class="lineno"><a class="line" href="classpcl_1_1_dinast_grabber.html#aa35cea81022e7749e6a1a6f840610320">  181</a></span>&#160;      <span class="keyword">enum</span> <a class="code" href="classpcl_1_1_dinast_grabber.html#aa35cea81022e7749e6a1a6f840610320">pixel_size</a> { RAW8=1, RGB16=2, RGB24=3, RGB32=4 };</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;      </div>
<div class="line"><a name="l00184"></a><span class="lineno"><a class="line" href="classpcl_1_1_dinast_grabber.html#a7920c624792743ca16938821c2ec3761">  184</a></span>&#160;      libusb_context *<a class="code" href="classpcl_1_1_dinast_grabber.html#a7920c624792743ca16938821c2ec3761">context_</a>;</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;      </div>
<div class="line"><a name="l00187"></a><span class="lineno"><a class="line" href="classpcl_1_1_dinast_grabber.html#a718d7ed8376e8c1fcd3f1358d899612a">  187</a></span>&#160;      <span class="keyword">struct </span>libusb_device_handle *<a class="code" href="classpcl_1_1_dinast_grabber.html#a718d7ed8376e8c1fcd3f1358d899612a">device_handle_</a>;</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;      </div>
<div class="line"><a name="l00192"></a><span class="lineno"><a class="line" href="classpcl_1_1_dinast_grabber.html#a2c0882b00ab9383bd71002f960ff4f62">  192</a></span>&#160;      <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *<a class="code" href="classpcl_1_1_dinast_grabber.html#a2c0882b00ab9383bd71002f960ff4f62">raw_buffer_</a> ;</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160; </div>
<div class="line"><a name="l00195"></a><span class="lineno"><a class="line" href="classpcl_1_1_dinast_grabber.html#acde89481de7363381141af69925b3f16">  195</a></span>&#160;      boost::circular_buffer&lt;unsigned char&gt; <a class="code" href="classpcl_1_1_dinast_grabber.html#acde89481de7363381141af69925b3f16">g_buffer_</a>;</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160; </div>
<div class="line"><a name="l00198"></a><span class="lineno"><a class="line" href="classpcl_1_1_dinast_grabber.html#a9e36cd03e5a5dd56f953e36b3cee4009">  198</a></span>&#160;      <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="classpcl_1_1_dinast_grabber.html#a9e36cd03e5a5dd56f953e36b3cee4009">bulk_ep_</a>;</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;      </div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;      <span class="keyword">enum</span> { CMD_READ_START=0xC7, CMD_READ_STOP=0xC8, CMD_GET_VERSION=0xDC, CMD_SEND_DATA=0xDE };</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160; </div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;      <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *image_;</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;      </div>
<div class="line"><a name="l00206"></a><span class="lineno"><a class="line" href="classpcl_1_1_dinast_grabber.html#ab7cb3f8310a5f9b7ff9c6cebba343fa1">  206</a></span>&#160;      <span class="keywordtype">bool</span> <a class="code" href="classpcl_1_1_dinast_grabber.html#ab7cb3f8310a5f9b7ff9c6cebba343fa1">second_image_</a>;</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;      </div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;      <span class="keywordtype">bool</span> running_;</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;      </div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;      boost::thread capture_thread_;</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;      </div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;      <span class="keyword">mutable</span> boost::mutex capture_mutex_;</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;      boost::signals2::signal&lt;sig_cb_dinast_point_cloud&gt;* point_cloud_signal_;</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;  };</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;} <span class="comment">//namespace pcl</span></div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160; </div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;<span class="preprocessor">#endif </span><span class="comment">// PCL_IO_DINAST_GRABBER_</span></div>
<div class="ttc" id="aclasspcl_1_1_dinast_grabber_html"><div class="ttname"><a href="classpcl_1_1_dinast_grabber.html">pcl::DinastGrabber</a></div><div class="ttdoc">Grabber for DINAST devices (i.e., IPA-1002, IPA-1110, IPA-2001)</div><div class="ttdef"><b>Definition:</b> dinast_grabber.h:58</div></div>
<div class="ttc" id="aclasspcl_1_1_dinast_grabber_html_a0f1ea76f5beefbc32ce4f2dc050e7e43"><div class="ttname"><a href="classpcl_1_1_dinast_grabber.html#a0f1ea76f5beefbc32ce4f2dc050e7e43">pcl::DinastGrabber::DinastGrabber</a></div><div class="ttdeci">DinastGrabber(const int device_position=1)</div><div class="ttdoc">Constructor that sets up the grabber constants.</div></div>
<div class="ttc" id="aclasspcl_1_1_dinast_grabber_html_a1f2efcf9ba4d7dd91504e0323c4aabbd"><div class="ttname"><a href="classpcl_1_1_dinast_grabber.html#a1f2efcf9ba4d7dd91504e0323c4aabbd">pcl::DinastGrabber::fov_</a></div><div class="ttdeci">double fov_</div><div class="ttdoc">diagonal Field of View</div><div class="ttdef"><b>Definition:</b> dinast_grabber.h:178</div></div>
<div class="ttc" id="aclasspcl_1_1_dinast_grabber_html_a2248e2c024ed3854be881405b2f6d51f"><div class="ttname"><a href="classpcl_1_1_dinast_grabber.html#a2248e2c024ed3854be881405b2f6d51f">pcl::DinastGrabber::image_height_</a></div><div class="ttdeci">int image_height_</div><div class="ttdoc">Height of image</div><div class="ttdef"><b>Definition:</b> dinast_grabber.h:167</div></div>
<div class="ttc" id="aclasspcl_1_1_dinast_grabber_html_a2822119cebf9e6b70d83eba22e420df2"><div class="ttname"><a href="classpcl_1_1_dinast_grabber.html#a2822119cebf9e6b70d83eba22e420df2">pcl::DinastGrabber::captureThreadFunction</a></div><div class="ttdeci">void captureThreadFunction()</div><div class="ttdoc">The function in charge of getting the data from the camera</div></div>
<div class="ttc" id="aclasspcl_1_1_dinast_grabber_html_a28a7daa98254a86996bef98d19291650"><div class="ttname"><a href="classpcl_1_1_dinast_grabber.html#a28a7daa98254a86996bef98d19291650">pcl::DinastGrabber::getXYZIPointCloud</a></div><div class="ttdeci">pcl::PointCloud&lt; pcl::PointXYZI &gt;::Ptr getXYZIPointCloud()</div><div class="ttdoc">Obtains XYZI Point Cloud from the image of the camera</div></div>
<div class="ttc" id="aclasspcl_1_1_dinast_grabber_html_a2c0882b00ab9383bd71002f960ff4f62"><div class="ttname"><a href="classpcl_1_1_dinast_grabber.html#a2c0882b00ab9383bd71002f960ff4f62">pcl::DinastGrabber::raw_buffer_</a></div><div class="ttdeci">unsigned char * raw_buffer_</div><div class="ttdoc">Temporary USB read buffer, since we read two RGB16 images at a time size is the double of two images ...</div><div class="ttdef"><b>Definition:</b> dinast_grabber.h:192</div></div>
<div class="ttc" id="aclasspcl_1_1_dinast_grabber_html_a2fa41a088e1ac5154f335ba340f2956e"><div class="ttname"><a href="classpcl_1_1_dinast_grabber.html#a2fa41a088e1ac5154f335ba340f2956e">pcl::DinastGrabber::start</a></div><div class="ttdeci">virtual void start()</div><div class="ttdoc">Start the data acquisition process.</div></div>
<div class="ttc" id="aclasspcl_1_1_dinast_grabber_html_a3cb4273312fd2a265269fce6515b08bd"><div class="ttname"><a href="classpcl_1_1_dinast_grabber.html#a3cb4273312fd2a265269fce6515b08bd">pcl::DinastGrabber::USBRxControlData</a></div><div class="ttdeci">bool USBRxControlData(const unsigned char req_code, unsigned char *buffer, int length)</div><div class="ttdoc">Send a RX data packet request</div></div>
<div class="ttc" id="aclasspcl_1_1_dinast_grabber_html_a50dae74f09a229057e02d6af552fbe02"><div class="ttname"><a href="classpcl_1_1_dinast_grabber.html#a50dae74f09a229057e02d6af552fbe02">pcl::DinastGrabber::checkHeader</a></div><div class="ttdeci">int checkHeader()</div><div class="ttdoc">Check if we have a header in the global buffer, and return the position of the next valid image.</div></div>
<div class="ttc" id="aclasspcl_1_1_dinast_grabber_html_a6306881b02a184daee20eae63b52ebc6"><div class="ttname"><a href="classpcl_1_1_dinast_grabber.html#a6306881b02a184daee20eae63b52ebc6">pcl::DinastGrabber::image_size_</a></div><div class="ttdeci">int image_size_</div><div class="ttdoc">Total size of image</div><div class="ttdef"><b>Definition:</b> dinast_grabber.h:170</div></div>
<div class="ttc" id="aclasspcl_1_1_dinast_grabber_html_a718d7ed8376e8c1fcd3f1358d899612a"><div class="ttname"><a href="classpcl_1_1_dinast_grabber.html#a718d7ed8376e8c1fcd3f1358d899612a">pcl::DinastGrabber::device_handle_</a></div><div class="ttdeci">struct libusb_device_handle * device_handle_</div><div class="ttdoc">the actual device_handle for the camera</div><div class="ttdef"><b>Definition:</b> dinast_grabber.h:187</div></div>
<div class="ttc" id="aclasspcl_1_1_dinast_grabber_html_a7920c624792743ca16938821c2ec3761"><div class="ttname"><a href="classpcl_1_1_dinast_grabber.html#a7920c624792743ca16938821c2ec3761">pcl::DinastGrabber::context_</a></div><div class="ttdeci">libusb_context * context_</div><div class="ttdoc">The libusb context</div><div class="ttdef"><b>Definition:</b> dinast_grabber.h:184</div></div>
<div class="ttc" id="aclasspcl_1_1_dinast_grabber_html_a7e79adb26a2d56c4cc20f66c02463cc9"><div class="ttname"><a href="classpcl_1_1_dinast_grabber.html#a7e79adb26a2d56c4cc20f66c02463cc9">pcl::DinastGrabber::readImage</a></div><div class="ttdeci">void readImage()</div><div class="ttdoc">Read image data and leaves it on image_</div></div>
<div class="ttc" id="aclasspcl_1_1_dinast_grabber_html_a8edd638582619b2de7601c07dc16341f"><div class="ttname"><a href="classpcl_1_1_dinast_grabber.html#a8edd638582619b2de7601c07dc16341f">pcl::DinastGrabber::image_width_</a></div><div class="ttdeci">int image_width_</div><div class="ttdoc">Width of image</div><div class="ttdef"><b>Definition:</b> dinast_grabber.h:164</div></div>
<div class="ttc" id="aclasspcl_1_1_dinast_grabber_html_a9bb84bf353580f95dcefd6bf2539aa11"><div class="ttname"><a href="classpcl_1_1_dinast_grabber.html#a9bb84bf353580f95dcefd6bf2539aa11">pcl::DinastGrabber::getFramesPerSecond</a></div><div class="ttdeci">virtual float getFramesPerSecond() const</div><div class="ttdoc">Obtain the number of frames per second (FPS).</div></div>
<div class="ttc" id="aclasspcl_1_1_dinast_grabber_html_a9bce83d72bf4fc2015a1f75272d0dba7"><div class="ttname"><a href="classpcl_1_1_dinast_grabber.html#a9bce83d72bf4fc2015a1f75272d0dba7">pcl::DinastGrabber::stop</a></div><div class="ttdeci">virtual void stop()</div><div class="ttdoc">Stop the data acquisition process.</div></div>
<div class="ttc" id="aclasspcl_1_1_dinast_grabber_html_a9e36cd03e5a5dd56f953e36b3cee4009"><div class="ttname"><a href="classpcl_1_1_dinast_grabber.html#a9e36cd03e5a5dd56f953e36b3cee4009">pcl::DinastGrabber::bulk_ep_</a></div><div class="ttdeci">unsigned char bulk_ep_</div><div class="ttdoc">Bulk endpoint address value</div><div class="ttdef"><b>Definition:</b> dinast_grabber.h:198</div></div>
<div class="ttc" id="aclasspcl_1_1_dinast_grabber_html_aa35cea81022e7749e6a1a6f840610320"><div class="ttname"><a href="classpcl_1_1_dinast_grabber.html#aa35cea81022e7749e6a1a6f840610320">pcl::DinastGrabber::pixel_size</a></div><div class="ttdeci">pixel_size</div><div class="ttdoc">Size of pixel</div><div class="ttdef"><b>Definition:</b> dinast_grabber.h:181</div></div>
<div class="ttc" id="aclasspcl_1_1_dinast_grabber_html_aa667c611eab72937cecc40c826060587"><div class="ttname"><a href="classpcl_1_1_dinast_grabber.html#aa667c611eab72937cecc40c826060587">pcl::DinastGrabber::setupDevice</a></div><div class="ttdeci">void setupDevice(int device_position, const int id_vendor=0x18d1, const int id_product=0x1402)</div><div class="ttdoc">Setup a Dinast 3D camera device</div></div>
<div class="ttc" id="aclasspcl_1_1_dinast_grabber_html_ab6bfc870a0ec85be4bdbf3ff1e5aae33"><div class="ttname"><a href="classpcl_1_1_dinast_grabber.html#ab6bfc870a0ec85be4bdbf3ff1e5aae33">pcl::DinastGrabber::getDeviceVersion</a></div><div class="ttdeci">std::string getDeviceVersion()</div><div class="ttdoc">Get the version number of the currently opened device</div></div>
<div class="ttc" id="aclasspcl_1_1_dinast_grabber_html_ab7cb3f8310a5f9b7ff9c6cebba343fa1"><div class="ttname"><a href="classpcl_1_1_dinast_grabber.html#ab7cb3f8310a5f9b7ff9c6cebba343fa1">pcl::DinastGrabber::second_image_</a></div><div class="ttdeci">bool second_image_</div><div class="ttdoc">Since there is no header after the first image, we need to save the state</div><div class="ttdef"><b>Definition:</b> dinast_grabber.h:206</div></div>
<div class="ttc" id="aclasspcl_1_1_dinast_grabber_html_ab7ddf2582ea6dfb424410a5a4f56bf14"><div class="ttname"><a href="classpcl_1_1_dinast_grabber.html#ab7ddf2582ea6dfb424410a5a4f56bf14">pcl::DinastGrabber::sync_packet_size_</a></div><div class="ttdeci">int sync_packet_size_</div><div class="ttdoc">Length of a sync packet</div><div class="ttdef"><b>Definition:</b> dinast_grabber.h:173</div></div>
<div class="ttc" id="aclasspcl_1_1_dinast_grabber_html_acc5af0ad29551a4c541a79c82d609080"><div class="ttname"><a href="classpcl_1_1_dinast_grabber.html#acc5af0ad29551a4c541a79c82d609080">pcl::DinastGrabber::USBTxControlData</a></div><div class="ttdeci">bool USBTxControlData(const unsigned char req_code, unsigned char *buffer, int length)</div><div class="ttdoc">Send a TX data packet request</div></div>
<div class="ttc" id="aclasspcl_1_1_dinast_grabber_html_acde89481de7363381141af69925b3f16"><div class="ttname"><a href="classpcl_1_1_dinast_grabber.html#acde89481de7363381141af69925b3f16">pcl::DinastGrabber::g_buffer_</a></div><div class="ttdeci">boost::circular_buffer&lt; unsigned char &gt; g_buffer_</div><div class="ttdoc">Global circular buffer</div><div class="ttdef"><b>Definition:</b> dinast_grabber.h:195</div></div>
<div class="ttc" id="aclasspcl_1_1_dinast_grabber_html_ad544683be834a3e3d0f61e389afc2543"><div class="ttname"><a href="classpcl_1_1_dinast_grabber.html#ad544683be834a3e3d0f61e389afc2543">pcl::DinastGrabber::~DinastGrabber</a></div><div class="ttdeci">virtual ~DinastGrabber()</div><div class="ttdoc">Destructor. It never throws.</div></div>
<div class="ttc" id="aclasspcl_1_1_dinast_grabber_html_aec6018ba8d3508ef9d2fdada8ee745be"><div class="ttname"><a href="classpcl_1_1_dinast_grabber.html#aec6018ba8d3508ef9d2fdada8ee745be">pcl::DinastGrabber::onInit</a></div><div class="ttdeci">void onInit(const int device_id)</div><div class="ttdoc">On initialization processing.</div></div>
<div class="ttc" id="aclasspcl_1_1_grabber_html"><div class="ttname"><a href="classpcl_1_1_grabber.html">pcl::Grabber</a></div><div class="ttdoc">Grabber interface for PCL 1.x device drivers</div><div class="ttdef"><b>Definition:</b> grabber.h:59</div></div>
<div class="ttc" id="acommon_2include_2pcl_2point__types_8h_html"><div class="ttname"><a href="common_2include_2pcl_2point__types_8h.html">point_types.h</a></div></div>
<div class="ttc" id="acommon_2time_8h_html"><div class="ttname"><a href="common_2time_8h.html">time.h</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_bc161955dc3a3d2485839eba21420d01.html">io</a></li><li class="navelem"><a class="el" href="dir_f94476489aa03dc3d80e45611e8a69e3.html">include</a></li><li class="navelem"><a class="el" href="dir_6c35451b89deaece78a478af78a55034.html">pcl</a></li><li class="navelem"><a class="el" href="dir_3fbee88df0a174bff38464c7c69fa75f.html">io</a></li><li class="navelem"><b>dinast_grabber.h</b></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
